p. 64
A formal description of the model
Explaining simple ⟷ complex models
| simple models |
complex models |
| can be fully described in just a few paragraphs |
may require you to partition your model description ↓ important computations in the main text, specific implementation in the appendix |
Partitioning your model description is advised for readability
variables
- i.e. grid with 𝐿 𝑥 𝐿 size (rather than specifying the size)
- makes model description general
- also reminds you of choices you make for parameter vlaues
Initialisation
Consider an 𝐿 × 𝐿 square grid with toroidal boundaries. At initialization, one agent is placed
upon each cell with a probability p, which characterizes the population density relative to
the available space (0 < 𝑝 < 1, so that each agent can relocate to an empty location). The
expected population size is therefore 𝑁 = 𝑝𝐿². The population is divided into 𝐺 groups, such
that each agent 𝑖 is randomly assigned a fixed group identity 𝑔𝑖 ∈ {1, 2, . . . , 𝐺}, each chosen with equal probability. For all of our analyses, we will use 𝐿 = 51 and 𝐺 = 2. The population is also defined by a similarity threshold, 𝑆, which defines the minimum proportion of an agent’s neighbors that must be similar for it to refrain from moving.
Note that the use of probabilistic assignments means that, even holding 𝑝 and 𝐺 constant, there will be some variation between simulation runs in terms of exactly how large
the population is and how many agents belong to each group. This stochasticity is often seen
as a positive because it allows us to assess how robust the model is to minor fluctuations.
However, one could also impose stricter requirements, so that, for example, the population
size was always the nearest integer value of 𝑝𝐿².